home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch8m < prev    next >
Encoding:
Internet Message Format  |  1990-06-08  |  51.5 KB

  1. Path: uunet!cs.utexas.edu!usc!ucsd!ogicse!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v10i031:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch8m
  5. Message-ID: <5739@tekred.CNA.TEK.COM>
  6. Date: 5 Jun 90 17:58:31 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2077
  9. Approved: billr@saab.CNA.TEK.COM
  10. Posted: Tue Jun  5 10:58:31 1990
  11.  
  12. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  13. Posting-number: Volume 10, Issue 31
  14. Archive-name: NetHack3/Patch8m
  15. Patch-To: NetHack3: Volume 7, Issue 56-93
  16.  
  17.  
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 13 (of 24)."
  26. # Contents:  patch8.02
  27. # Wrapped by billr@saab on Mon Jun  4 15:27:23 1990
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'patch8.02' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'patch8.02'\"
  31. else
  32. echo shar: Extracting \"'patch8.02'\" \(48763 characters\)
  33. sed "s/^X//" >'patch8.02' <<'END_OF_FILE'
  34. X*** src/Old/do.c    Sun Jun  3 12:52:30 1990
  35. X--- src/do.c    Thu May 31 22:10:44 1990
  36. X***************
  37. X*** 5,10 ****
  38. X--- 5,17 ----
  39. X  /* Contains code for 'd', 'D' (drop), '>', '<' (up, down) */
  40. X  
  41. X  #include "hack.h"
  42. X+ #ifndef STUPID_CPP
  43. X+ /* fortunately, only errno is used from <errno.h> and all known STUPID_CPPs
  44. X+  * are on UNIX SYSV and will thus all be using the extern int errno; declared
  45. X+  * below 
  46. X+  */
  47. X+ #include <errno.h>
  48. X+ #endif
  49. X  
  50. X  #if defined(DGK)
  51. X  extern struct finfo fileinfo[];
  52. X***************
  53. X*** 13,33 ****
  54. X  #endif
  55. X  
  56. X  #ifdef SINKS
  57. X  static void FDECL(trycall, (struct obj *));
  58. X! static void FDECL(dosinkring, (struct obj *));
  59. X! #endif
  60. X! #ifndef OVERLAY
  61. X! static int FDECL(drop, (struct obj *));
  62. X! #endif
  63. X! static void NDECL(litter);
  64. X! #ifndef OVERLAY
  65. X! static int NDECL(wipeoff);
  66. X! #endif
  67. X  boolean NDECL(drag_down);
  68. X  
  69. X  #ifdef OVLB
  70. X  
  71. X! static const char drop_types[] = { '0', GOLD_SYM, '#', 0 };
  72. X  
  73. X  int
  74. X  dodrop() {
  75. X--- 20,38 ----
  76. X  #endif
  77. X  
  78. X  #ifdef SINKS
  79. X+ # ifdef OVLB
  80. X  static void FDECL(trycall, (struct obj *));
  81. X! # endif /* OVLB */
  82. X! STATIC_DCL void FDECL(dosinkring, (struct obj *));
  83. X! #endif /* SINKS */
  84. X! STATIC_PTR int FDECL(drop, (struct obj *));
  85. X! STATIC_DCL void NDECL(litter);
  86. X! STATIC_PTR int NDECL(wipeoff);
  87. X  boolean NDECL(drag_down);
  88. X  
  89. X  #ifdef OVLB
  90. X  
  91. X! static const char NEARDATA drop_types[] = { '0', GOLD_SYM, '#', 0 };
  92. X  
  93. X  int
  94. X  dodrop() {
  95. X***************
  96. X*** 90,96 ****
  97. X          }
  98. X          obfree(obj, (struct obj *)0);
  99. X          mnewsym(x,y);
  100. X!         if ((x != u.ux || y != u.uy || Invisible) && !Blind)
  101. X          newsym(x,y);
  102. X          return TRUE;
  103. X      }
  104. X--- 95,101 ----
  105. X          }
  106. X          obfree(obj, (struct obj *)0);
  107. X          mnewsym(x,y);
  108. X!         if (!vism_at(x,y) && (x != u.ux || y != u.uy || Invisible) && !Blind)
  109. X          newsym(x,y);
  110. X          return TRUE;
  111. X      }
  112. X***************
  113. X*** 132,138 ****
  114. X         docall(obj);
  115. X  }
  116. X  
  117. X! static
  118. X  void
  119. X  dosinkring(obj)  /* obj is a ring being dropped over a kitchen sink */
  120. X  register struct obj *obj;
  121. X--- 137,143 ----
  122. X         docall(obj);
  123. X  }
  124. X  
  125. X! STATIC_OVL
  126. X  void
  127. X  dosinkring(obj)  /* obj is a ring being dropped over a kitchen sink */
  128. X  register struct obj *obj;
  129. X***************
  130. X*** 256,261 ****
  131. X--- 261,269 ----
  132. X  }
  133. X  #endif
  134. X  
  135. X+ #endif /* OVLB */
  136. X+ #ifdef OVL0
  137. X+ 
  138. X  /* some common tests when trying to drop or throw items */
  139. X  boolean
  140. X  canletgo(obj,word)
  141. X***************
  142. X*** 297,305 ****
  143. X      return(TRUE);
  144. X  }
  145. X  
  146. X! #ifndef OVERLAY
  147. X! static 
  148. X! #endif
  149. X  int
  150. X  drop(obj) register struct obj *obj; {
  151. X      if(!obj) return(0);
  152. X--- 305,311 ----
  153. X      return(TRUE);
  154. X  }
  155. X  
  156. X! STATIC_PTR
  157. X  int
  158. X  drop(obj) register struct obj *obj; {
  159. X      if(!obj) return(0);
  160. X***************
  161. X*** 395,402 ****
  162. X      return(ggetobj("drop", drop, 0));
  163. X  }
  164. X  
  165. X  #ifdef STRONGHOLD
  166. X! static boolean at_ladder = FALSE;    /* on a ladder, used in goto_level */
  167. X  #endif
  168. X  
  169. X  int
  170. X--- 401,411 ----
  171. X      return(ggetobj("drop", drop, 0));
  172. X  }
  173. X  
  174. X+ #endif /* OVL0 */
  175. X+ #ifdef OVL2
  176. X+ 
  177. X  #ifdef STRONGHOLD
  178. X! static boolean NEARDATA at_ladder = FALSE;    /* on a ladder, used in goto_level */
  179. X  #endif
  180. X  
  181. X  int
  182. X***************
  183. X*** 493,514 ****
  184. X  #endif
  185. X          return(1);
  186. X      }
  187. X- 
  188. X- #ifdef ENDGAME
  189. X      if (dlevel == 1) {
  190. X  #ifdef MACOS
  191. X          if(!flags.silent) SysBeep(20);
  192. X          if(UseMacAlertText(128,
  193. X!             "Beware, there will be no return!  Still climb?") != 1) {
  194. X              return 0;
  195. X          }
  196. X  #else
  197. X          pline("Beware, there will be no return!  Still climb? ");
  198. X          if (yn() != 'y') return(0);
  199. X-         else more();
  200. X  #endif /* MACOS */
  201. X      }
  202. X- #endif
  203. X  #ifdef WALKIES
  204. X      if(!next_to_u()) {
  205. X          You("are held back by your pet!");
  206. X--- 502,519 ----
  207. X  #endif
  208. X          return(1);
  209. X      }
  210. X      if (dlevel == 1) {
  211. X  #ifdef MACOS
  212. X          if(!flags.silent) SysBeep(20);
  213. X          if(UseMacAlertText(128,
  214. X!             "Beware, there will be no return!  Still climb?") != 1) {
  215. X              return 0;
  216. X          }
  217. X  #else
  218. X          pline("Beware, there will be no return!  Still climb? ");
  219. X          if (yn() != 'y') return(0);
  220. X  #endif /* MACOS */
  221. X      }
  222. X  #ifdef WALKIES
  223. X      if(!next_to_u()) {
  224. X          You("are held back by your pet!");
  225. X***************
  226. X*** 532,539 ****
  227. X      return(1);
  228. X  }
  229. X  
  230. X  
  231. X! static void
  232. X  litter()
  233. X  {
  234. X      struct obj *otmp = invent, *nextobj;
  235. X--- 537,547 ----
  236. X      return(1);
  237. X  }
  238. X  
  239. X+ #endif /* OVL2 */
  240. X+ #ifdef OVLB
  241. X  
  242. X! STATIC_OVL
  243. X! void
  244. X  litter()
  245. X  {
  246. X      struct obj *otmp = invent, *nextobj;
  247. X***************
  248. X*** 600,605 ****
  249. X--- 608,616 ----
  250. X      return(FALSE);
  251. X  }
  252. X  
  253. X+ #endif /* OVLB */
  254. X+ #ifdef OVL2
  255. X+ 
  256. X  int save_dlevel = 0;
  257. X  
  258. X  void
  259. X***************
  260. X*** 622,641 ****
  261. X  #endif
  262. X          done(ESCAPED);        /* in fact < 0 is impossible */
  263. X  
  264. X  /*    If you have the amulet and are trying to get out of Hell, going
  265. X   *    up a set of stairs sometimes does some very strange things!
  266. X   */
  267. X  #ifdef HARD
  268. X!     if(Inhell && up && at_stairs  &&
  269. X!        (dlevel < MAXLEVEL-3) && u.uhave_amulet) {
  270. X!         newlevel = (rn2(5) ? newlevel :
  271. X  /* neutral */         !u.ualigntyp ? (rn2(2) ? dlevel : dlevel + (rnd(5) - 2)) :
  272. X  /* lawful */         (u.ualigntyp == U_LAWFUL) ? dlevel + (rnd(5) - 2) :
  273. X  /* chaotic */         dlevel);
  274. X-         pline("A mysterious force surrounds you...");
  275. X          if(newlevel < 1) newlevel = dlevel;
  276. X!         if(newlevel == dlevel) (void) dotele();
  277. X!         
  278. X      }
  279. X  #endif /* HARD /* */
  280. X      if(newlevel == dlevel) return;          /* this can happen */
  281. X--- 633,660 ----
  282. X  #endif
  283. X          done(ESCAPED);        /* in fact < 0 is impossible */
  284. X  
  285. X+ #ifdef MACOS
  286. X+     freeSegs(&segments);
  287. X+ #endif
  288. X  /*    If you have the amulet and are trying to get out of Hell, going
  289. X   *    up a set of stairs sometimes does some very strange things!
  290. X   */
  291. X  #ifdef HARD
  292. X!     if(Inhell && up && !at_ladder &&
  293. X!             (dlevel < MAXLEVEL-3) && u.uhave_amulet) {
  294. X!         int olev = newlevel;
  295. X! 
  296. X!         newlevel = (rn2(4) ? newlevel :
  297. X  /* neutral */         !u.ualigntyp ? (rn2(2) ? dlevel : dlevel + (rnd(5) - 2)) :
  298. X  /* lawful */         (u.ualigntyp == U_LAWFUL) ? dlevel + (rnd(5) - 2) :
  299. X  /* chaotic */         dlevel);
  300. X          if(newlevel < 1) newlevel = dlevel;
  301. X!         if(newlevel != olev)
  302. X!             pline("A mysterious force momentarily surrounds you...");
  303. X!         if(newlevel == dlevel) {
  304. X!         (void) dotele();
  305. X!         return;
  306. X!         }
  307. X      }
  308. X  #endif /* HARD /* */
  309. X      if(newlevel == dlevel) return;          /* this can happen */
  310. X***************
  311. X*** 689,695 ****
  312. X          
  313. X          t = (term_info *)GetWRefCon(HackWindow);
  314. X          fileName[0] = (char)strlen(lock);
  315. X!         (void)Strcpy((char *)&fileName[1],lock);
  316. X          if (FSOpen(fileName, t->system.sysVRefNum, &refNum)) {
  317. X                  if (er = Create(&fileName,t->system.sysVRefNum,
  318. X                              CREATOR,LEVEL_TYPE))
  319. X--- 708,714 ----
  320. X          
  321. X          t = (term_info *)GetWRefCon(HackWindow);
  322. X          fileName[0] = (char)strlen(lock);
  323. X!         Strcpy((char *)&fileName[1],lock);
  324. X          if (FSOpen(fileName, t->system.sysVRefNum, &refNum)) {
  325. X                  if (er = Create(&fileName,t->system.sysVRefNum,
  326. X                              CREATOR,LEVEL_TYPE))
  327. X***************
  328. X*** 799,805 ****
  329. X  #else
  330. X          if((fd = open(lock,0)) < 0) {
  331. X  #endif
  332. X!             pline("Cannot open %s .", lock);
  333. X              pline("Probably someone removed it.");
  334. X              done(TRICKED);
  335. X          }
  336. X--- 818,825 ----
  337. X  #else
  338. X          if((fd = open(lock,0)) < 0) {
  339. X  #endif
  340. X!             extern int errno;
  341. X!             pline("Cannot open \"%s\" (errno %d).", lock, errno);
  342. X              pline("Probably someone removed it.");
  343. X              done(TRICKED);
  344. X          }
  345. X***************
  346. X*** 963,979 ****
  347. X          || dlevel == ENDLEVEL
  348. X  #endif
  349. X          );
  350. X  }
  351. X  
  352. X  int
  353. X  donull() {
  354. X      return(1);    /* Do nothing, but let other things happen */
  355. X  }
  356. X  
  357. X! #ifndef OVERLAY
  358. X! static
  359. X! #endif
  360. X! int
  361. X  wipeoff() {
  362. X      if(u.ucreamed < 4)    u.ucreamed = 0;
  363. X      else            u.ucreamed -= 4;
  364. X--- 983,1006 ----
  365. X          || dlevel == ENDLEVEL
  366. X  #endif
  367. X          );
  368. X+ #ifdef MACOS
  369. X+     freeSegs(&segments);
  370. X+     segments = SEG_DO;
  371. X+ #endif
  372. X  }
  373. X  
  374. X+ #endif /* OVL2 */
  375. X+ #ifdef OVL3
  376. X+ 
  377. X  int
  378. X  donull() {
  379. X      return(1);    /* Do nothing, but let other things happen */
  380. X  }
  381. X  
  382. X! #endif /* OVL3 */
  383. X! #ifdef OVLB
  384. X! 
  385. X! STATIC_PTR int
  386. X  wipeoff() {
  387. X      if(u.ucreamed < 4)    u.ucreamed = 0;
  388. X      else            u.ucreamed -= 4;
  389. X***************
  390. X*** 995,1001 ****
  391. X  dowipe()
  392. X  {
  393. X      if(u.ucreamed)  {
  394. X!         static char buf[39];
  395. X  
  396. X          Sprintf(buf, "wiping off your %s", body_part(FACE));
  397. X          set_occupation(wipeoff, buf, 0);
  398. X--- 1022,1028 ----
  399. X  dowipe()
  400. X  {
  401. X      if(u.ucreamed)  {
  402. X!         static char NEARDATA buf[39];
  403. X  
  404. X          Sprintf(buf, "wiping off your %s", body_part(FACE));
  405. X          set_occupation(wipeoff, buf, 0);
  406. X***************
  407. X*** 1008,1013 ****
  408. X--- 1035,1043 ----
  409. X      return(1);
  410. X  }
  411. X  
  412. X+ #endif /* OVLB */
  413. X+ #ifdef OVL1
  414. X+ 
  415. X  /* split obj so that it gets size num */
  416. X  /* remainder is put in the object structure delivered by this call */
  417. X  struct obj *
  418. X***************
  419. X*** 1026,1031 ****
  420. X--- 1056,1064 ----
  421. X      if(obj->unpaid) splitbill(obj,otmp);
  422. X      return(otmp);
  423. X  }
  424. X+ 
  425. X+ #endif /* OVL1 */
  426. X+ #ifdef OVLB
  427. X  
  428. X  void
  429. X  set_wounded_legs(side, timex)
  430. X*** src/Old/do_name.c    Sun Jun  3 12:53:09 1990
  431. X--- src/do_name.c    Thu May 31 22:10:46 1990
  432. X***************
  433. X*** 8,18 ****
  434. X  # include <ctype.h>
  435. X  #endif
  436. X  
  437. X  static char *FDECL(visctrl, (CHAR_P));
  438. X  static void FDECL(do_oname, (struct obj *));
  439. X  
  440. X- #ifdef OVLB
  441. X- 
  442. X  static
  443. X  char *
  444. X  visctrl(c)
  445. X--- 8,18 ----
  446. X  # include <ctype.h>
  447. X  #endif
  448. X  
  449. X+ #ifdef OVLB
  450. X+ 
  451. X  static char *FDECL(visctrl, (CHAR_P));
  452. X  static void FDECL(do_oname, (struct obj *));
  453. X  
  454. X  static
  455. X  char *
  456. X  visctrl(c)
  457. X***************
  458. X*** 219,229 ****
  459. X          pline("The artifact seems to resist the attempt.");
  460. X      else if (restr_name(obj, buf) || exist_artifact(obj, buf)) {
  461. X          int n = rn2(strlen(buf));
  462. X!         char c;
  463. X  
  464. X!         while (tolower(buf[n]) == (c = 'a' + rn2('z'-'a')));
  465. X!         if (isupper(buf[n])) buf[n] = toupper(c);
  466. X!         else buf[n] = c;
  467. X          pline("While engraving your hand slips.");
  468. X          more();
  469. X          You("engrave: \"%s\".",buf);
  470. X--- 219,232 ----
  471. X          pline("The artifact seems to resist the attempt.");
  472. X      else if (restr_name(obj, buf) || exist_artifact(obj, buf)) {
  473. X          int n = rn2(strlen(buf));
  474. X!         char c1,c2;
  475. X  
  476. X!         c1 = isupper(buf[n]) ? tolower(buf[n]) : buf[n];
  477. X!         while (c1 == (c2 = 'a' + rn2('z'-'a')));
  478. X!         if (isupper(buf[n]))
  479. X!             /* islower(c2) guaranteed by generation */
  480. X!             buf[n] = toupper(c2);
  481. X!         else buf[n] = c2;
  482. X          pline("While engraving your hand slips.");
  483. X          more();
  484. X          You("engrave: \"%s\".",buf);
  485. X***************
  486. X*** 244,259 ****
  487. X      register int    lth;
  488. X  
  489. X      lth = *buf ? strlen(buf)+1 : 0;
  490. X  #ifdef NAMED_ITEMS
  491. X!     /* if named artifact exists in the game, do not create another */
  492. X!     if (exist_artifact(obj, buf))
  493. X!         lth = 0;
  494. X      else
  495. X          artifact_exists(obj, buf, TRUE);
  496. X  #endif
  497. X-     if(lth > 63){
  498. X-         lth = 63;
  499. X-     }
  500. X      otmp2 = newobj(lth);
  501. X      *otmp2 = *obj;
  502. X      otmp2->onamelth = lth;
  503. X--- 247,268 ----
  504. X      register int    lth;
  505. X  
  506. X      lth = *buf ? strlen(buf)+1 : 0;
  507. X+     if(lth > 63){
  508. X+         lth = 63;
  509. X+     }
  510. X+     /* if already properly named */
  511. X+     if(lth == obj->onamelth && (!lth || !strcmp(ONAME(obj),buf)))
  512. X+         return obj;
  513. X  #ifdef NAMED_ITEMS
  514. X!     /* If named artifact exists in the game, do not create another.
  515. X!      * Also trying to create an artifact shouldn't de-artifact
  516. X!      * it (e.g. Excalibur from prayer). In this case the object
  517. X!      * will retain its current name. */
  518. X!     if (is_artifact(obj) || exist_artifact(obj, buf))
  519. X!         return obj;
  520. X      else
  521. X          artifact_exists(obj, buf, TRUE);
  522. X  #endif
  523. X      otmp2 = newobj(lth);
  524. X      *otmp2 = *obj;
  525. X      otmp2->onamelth = lth;
  526. X***************
  527. X*** 299,305 ****
  528. X      return otmp2;
  529. X  }
  530. X  
  531. X! static const char callable[] = {
  532. X      SCROLL_SYM, POTION_SYM, WAND_SYM, RING_SYM, AMULET_SYM, GEM_SYM,
  533. X  #ifdef SPELLS
  534. X      SPBOOK_SYM,
  535. X--- 308,314 ----
  536. X      return otmp2;
  537. X  }
  538. X  
  539. X! static const char NEARDATA callable[] = {
  540. X      SCROLL_SYM, POTION_SYM, WAND_SYM, RING_SYM, AMULET_SYM, GEM_SYM,
  541. X  #ifdef SPELLS
  542. X      SPBOOK_SYM,
  543. X***************
  544. X*** 435,441 ****
  545. X              gn = ghostnames[rn2(SIZE(ghostnames))];
  546. X              Strcpy((char *) mtmp->mextra, !rn2(5) ? (const char *)plname : gn);
  547. X            }
  548. X!           Sprintf(buf, "%s's ghost", (char *) mtmp->mextra);
  549. X          }
  550. X          break;
  551. X          default:
  552. X--- 444,455 ----
  553. X              gn = ghostnames[rn2(SIZE(ghostnames))];
  554. X              Strcpy((char *) mtmp->mextra, !rn2(5) ? (const char *)plname : gn);
  555. X            }
  556. X!           if (Hallucination) {
  557. X!             Strcat(buf, "the ");
  558. X!             Strcat(buf, rndmonnam());
  559. X!           }
  560. X!           else
  561. X!             Sprintf(buf, "%s's ghost", (char *) mtmp->mextra);
  562. X          }
  563. X          break;
  564. X          default:
  565. X***************
  566. X*** 583,589 ****
  567. X  const char *str;
  568. X  const char *pronoun;
  569. X  {
  570. X!     static char buf[BUFSZ];
  571. X      register int i;
  572. X  
  573. X      for(i=0; pronoun_pairs[i][0]; i++) {
  574. X--- 597,603 ----
  575. X  const char *str;
  576. X  const char *pronoun;
  577. X  {
  578. X!     static char NEARDATA buf[BUFSZ];
  579. X      register int i;
  580. X  
  581. X      for(i=0; pronoun_pairs[i][0]; i++) {
  582. X*** src/Old/do_wear.c    Sun Jun  3 12:53:36 1990
  583. X--- src/do_wear.c    Sun May 27 17:57:57 1990
  584. X***************
  585. X*** 6,24 ****
  586. X  
  587. X  #ifdef OVLB
  588. X  
  589. X! static int todelay;
  590. X  
  591. X  #endif /*OVLB */
  592. X  
  593. X  #ifndef OVLB
  594. X  
  595. X! OSTATIC long takeoff_mask, taking_off;
  596. X  
  597. X  #else /* OVLB */
  598. X  
  599. X! XSTATIC long takeoff_mask = 0L, taking_off = 0L;
  600. X  
  601. X! static const long takeoff_order[] = { WORN_BLINDF, 1L, /* weapon */
  602. X      WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK,
  603. X      WORN_HELMET, WORN_AMUL, WORN_ARMOR,
  604. X  #ifdef SHIRT
  605. X--- 6,24 ----
  606. X  
  607. X  #ifdef OVLB
  608. X  
  609. X! static int NEARDATA todelay;
  610. X  
  611. X  #endif /*OVLB */
  612. X  
  613. X  #ifndef OVLB
  614. X  
  615. X! STATIC_DCL long takeoff_mask, taking_off;
  616. X  
  617. X  #else /* OVLB */
  618. X  
  619. X! STATIC_OVL long NEARDATA takeoff_mask = 0L, NEARDATA taking_off = 0L;
  620. X  
  621. X! static const long NEARDATA takeoff_order[] = { WORN_BLINDF, 1L, /* weapon */
  622. X      WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK,
  623. X      WORN_HELMET, WORN_AMUL, WORN_ARMOR,
  624. X  #ifdef SHIRT
  625. X***************
  626. X*** 27,50 ****
  627. X      WORN_BOOTS, 0L };
  628. X  
  629. X  static void FDECL(on_msg, (struct obj *));
  630. X! #ifndef OVERLAY
  631. X! static int NDECL(Armor_on);
  632. X! static int NDECL(Boots_on);
  633. X! #endif
  634. X  static int NDECL(Cloak_on);
  635. X! #ifndef OVERLAY
  636. X! static int NDECL(Helmet_on);
  637. X! static int NDECL(Gloves_on);
  638. X! #endif
  639. X  static void NDECL(Amulet_on);
  640. X  static void FDECL(Ring_off_or_gone, (struct obj *, BOOLEAN_P));
  641. X! #ifndef OVERLAY
  642. X! static int FDECL(select_off, (struct obj *));
  643. X! #endif
  644. X  static struct obj *NDECL(do_takeoff);
  645. X! #ifndef OVERLAY
  646. X! static int NDECL(take_off);
  647. X! #endif
  648. X  
  649. X  void
  650. X  off_msg(otmp) register struct obj *otmp; {
  651. X--- 27,42 ----
  652. X      WORN_BOOTS, 0L };
  653. X  
  654. X  static void FDECL(on_msg, (struct obj *));
  655. X! STATIC_PTR int NDECL(Armor_on);
  656. X! STATIC_PTR int NDECL(Boots_on);
  657. X  static int NDECL(Cloak_on);
  658. X! STATIC_PTR int NDECL(Helmet_on);
  659. X! STATIC_PTR int NDECL(Gloves_on);
  660. X  static void NDECL(Amulet_on);
  661. X  static void FDECL(Ring_off_or_gone, (struct obj *, BOOLEAN_P));
  662. X! STATIC_PTR int FDECL(select_off, (struct obj *));
  663. X  static struct obj *NDECL(do_takeoff);
  664. X! STATIC_PTR int NDECL(take_off);
  665. X  
  666. X  void
  667. X  off_msg(otmp) register struct obj *otmp; {
  668. X***************
  669. X*** 59,64 ****
  670. X--- 51,59 ----
  671. X          You("are now wearing %s.", an(xname(otmp)));
  672. X  }
  673. X  
  674. X+ #endif /* OVLB */
  675. X+ #ifdef OVL2
  676. X+ 
  677. X  boolean
  678. X  is_boots(otmp) register struct obj *otmp; {
  679. X      return(otmp->otyp >= LOW_BOOTS &&
  680. X***************
  681. X*** 76,81 ****
  682. X--- 71,79 ----
  683. X  #endif
  684. X  }
  685. X  
  686. X+ #endif /* OVLB */
  687. X+ #ifdef OVL2
  688. X+ 
  689. X  boolean
  690. X  is_gloves(otmp) register struct obj *otmp; {
  691. X      return(otmp->otyp >= LEATHER_GLOVES &&
  692. X***************
  693. X*** 82,87 ****
  694. X--- 80,88 ----
  695. X             otmp->otyp <= GAUNTLETS_OF_DEXTERITY);
  696. X  }
  697. X  
  698. X+ #endif /* OVL2 */
  699. X+ #ifdef OVLB
  700. X+ 
  701. X  boolean
  702. X  is_cloak(otmp) register struct obj *otmp; {
  703. X      return(otmp->otyp >= MUMMY_WRAPPING &&
  704. X***************
  705. X*** 99,107 ****
  706. X   * The Type_off() functions call setworn() themselves.
  707. X   */
  708. X  
  709. X! #ifndef OVERLAY
  710. X! static 
  711. X! #endif
  712. X  int
  713. X  Boots_on() {
  714. X      long oldprop =
  715. X--- 100,106 ----
  716. X   * The Type_off() functions call setworn() themselves.
  717. X   */
  718. X  
  719. X! STATIC_PTR
  720. X  int
  721. X  Boots_on() {
  722. X      long oldprop =
  723. X***************
  724. X*** 250,258 ****
  725. X      return 0;
  726. X  }
  727. X  
  728. X! #ifndef OVERLAY
  729. X! static 
  730. X! #endif
  731. X  int
  732. X  Helmet_on() {
  733. X      switch(uarmh->otyp) {
  734. X--- 249,255 ----
  735. X      return 0;
  736. X  }
  737. X  
  738. X! STATIC_PTR
  739. X  int
  740. X  Helmet_on() {
  741. X      switch(uarmh->otyp) {
  742. X***************
  743. X*** 321,329 ****
  744. X      return 0;
  745. X  }
  746. X  
  747. X! #ifndef OVERLAY
  748. X! static 
  749. X! #endif
  750. X  int
  751. X  Gloves_on() {
  752. X      long oldprop =
  753. X--- 318,324 ----
  754. X      return 0;
  755. X  }
  756. X  
  757. X! STATIC_PTR
  758. X  int
  759. X  Gloves_on() {
  760. X      long oldprop =
  761. X***************
  762. X*** 431,439 ****
  763. X   * is fire resistance, and we have to immediately set HFire_resistance in worn.c
  764. X   * since worn.c will check it before returning.
  765. X   */
  766. X! #ifndef OVERLAY
  767. X! static 
  768. X! #endif
  769. X  int
  770. X  Armor_on()
  771. X  {
  772. X--- 426,432 ----
  773. X   * is fire resistance, and we have to immediately set HFire_resistance in worn.c
  774. X   * since worn.c will check it before returning.
  775. X   */
  776. X! STATIC_PTR
  777. X  int
  778. X  Armor_on()
  779. X  {
  780. X***************
  781. X*** 772,779 ****
  782. X      multi = 0;
  783. X  }
  784. X  
  785. X! static const char clothes[] = {ARMOR_SYM, 0};
  786. X! static const char accessories[] = {RING_SYM, AMULET_SYM, TOOL_SYM, 0};
  787. X  
  788. X  int
  789. X  dotakeoff() {
  790. X--- 765,772 ----
  791. X      multi = 0;
  792. X  }
  793. X  
  794. X! static const char NEARDATA clothes[] = {ARMOR_SYM, 0};
  795. X! static const char NEARDATA accessories[] = {RING_SYM, AMULET_SYM, TOOL_SYM, 0};
  796. X  
  797. X  int
  798. X  dotakeoff() {
  799. X***************
  800. X*** 821,827 ****
  801. X          You("can't take that off.");
  802. X          return(0);
  803. X      }
  804. X!     if(otmp == uarmg && uwep && uwep->cursed) {    /* myers@uwmacc */
  805. X      You("seem unable to take off the gloves while holding your %s.",
  806. X        is_sword(uwep) ? "sword" : "weapon");
  807. X          uwep->bknown = 1;
  808. X--- 814,820 ----
  809. X          You("can't take that off.");
  810. X          return(0);
  811. X      }
  812. X!     if(otmp == uarmg && welded(uwep)) {
  813. X      You("seem unable to take off the gloves while holding your %s.",
  814. X        is_sword(uwep) ? "sword" : "weapon");
  815. X          uwep->bknown = 1;
  816. X***************
  817. X*** 1327,1335 ****
  818. X      }
  819. X  }
  820. X  
  821. X! #ifndef OVERLAY
  822. X! static 
  823. X! #endif
  824. X  int
  825. X  select_off(otmp)
  826. X  register struct obj *otmp;
  827. X--- 1320,1326 ----
  828. X      }
  829. X  }
  830. X  
  831. X! STATIC_PTR
  832. X  int
  833. X  select_off(otmp)
  834. X  register struct obj *otmp;
  835. X***************
  836. X*** 1435,1443 ****
  837. X      return(otmp);
  838. X  }
  839. X  
  840. X! #ifndef OVERLAY
  841. X! static 
  842. X! #endif
  843. X  int
  844. X  take_off() {
  845. X  
  846. X--- 1426,1432 ----
  847. X      return(otmp);
  848. X  }
  849. X  
  850. X! STATIC_PTR
  851. X  int
  852. X  take_off() {
  853. X  
  854. X*** src/Old/dog.c    Sun Jun  3 12:54:27 1990
  855. X--- src/dog.c    Mon May 28 15:45:39 1990
  856. X***************
  857. X*** 7,14 ****
  858. X  
  859. X  #ifdef OVLB
  860. X  
  861. X! char dogname[63] = DUMMY;
  862. X! char catname[63] = DUMMY;
  863. X  
  864. X  #endif /* OVLB */
  865. X  
  866. X--- 7,14 ----
  867. X  
  868. X  #ifdef OVLB
  869. X  
  870. X! char NEARDATA dogname[63] = DUMMY;
  871. X! char NEARDATA catname[63] = DUMMY;
  872. X  
  873. X  #endif /* OVLB */
  874. X  
  875. X***************
  876. X*** 130,136 ****
  877. X              mtmp0->nmon = mtmp->nmon;
  878. X              mtmp->nmon = fmon;
  879. X              fmon = mtmp;
  880. X!             if (mtmp->data->geno & G_GENOD) {
  881. X  #ifdef KOPS
  882. X              allow_kops = FALSE;
  883. X  #endif
  884. X--- 130,136 ----
  885. X              mtmp0->nmon = mtmp->nmon;
  886. X              mtmp->nmon = fmon;
  887. X              fmon = mtmp;
  888. X!             if ((mtmp->data->geno&G_GENOD) && !(mtmp->data->geno&G_UNIQ)) {
  889. X  #ifdef KOPS
  890. X              allow_kops = FALSE;
  891. X  #endif
  892. X***************
  893. X*** 147,152 ****
  894. X--- 147,155 ----
  895. X      }
  896. X  }
  897. X  
  898. X+ #endif /* OVLB */
  899. X+ #ifdef OVL2
  900. X+ 
  901. X  void
  902. X  keepdogs(){
  903. X  register struct monst *mtmp;
  904. X***************
  905. X*** 195,200 ****
  906. X--- 198,206 ----
  907. X      }
  908. X  }
  909. X  
  910. X+ #endif /* OVL2 */
  911. X+ #ifdef OVLB
  912. X+ 
  913. X  void
  914. X  fall_down(mtmp, tolev) 
  915. X  register struct monst *mtmp; 
  916. X***************
  917. X*** 305,311 ****
  918. X  #endif /* OVL0 */
  919. X  #ifdef OVLB
  920. X  
  921. X! int
  922. X  tamedog(mtmp, obj)
  923. X  register struct monst *mtmp;
  924. X  register struct obj *obj;
  925. X--- 311,317 ----
  926. X  #endif /* OVL0 */
  927. X  #ifdef OVLB
  928. X  
  929. X! struct monst *
  930. X  tamedog(mtmp, obj)
  931. X  register struct monst *mtmp;
  932. X  register struct obj *obj;
  933. X***************
  934. X*** 312,330 ****
  935. X  {
  936. X      register struct monst *mtmp2;
  937. X  
  938. X      /* worst case, at least he'll be peaceful. */
  939. X      mtmp->mpeaceful = 1;
  940. X      if(flags.moonphase == FULL_MOON && night() && rn2(6) && obj
  941. X                          && mtmp->data->mlet == S_DOG)
  942. X!         return(0);
  943. X  
  944. X      /* If we cannot tame him, at least he's no longer afraid. */
  945. X      mtmp->mflee = 0;
  946. X      mtmp->mfleetim = 0;
  947. X      if(mtmp->mtame || !mtmp->mcanmove ||
  948. X- #ifdef MEDUSA
  949. X-        mtmp->data == &mons[PM_MEDUSA] ||
  950. X- #endif
  951. X         mtmp->isshk || mtmp->isgd ||
  952. X  #if defined(ALTARS) && defined(THEOLOGY)
  953. X         mtmp->ispriest ||
  954. X--- 318,341 ----
  955. X  {
  956. X      register struct monst *mtmp2;
  957. X  
  958. X+     /* The wiz and medusa aren't even made peaceful. */
  959. X+     if (mtmp->iswiz
  960. X+ #ifdef MEDUSA
  961. X+                || mtmp->data == &mons[PM_MEDUSA]
  962. X+ #endif
  963. X+                                 )
  964. X+         return((struct monst *)0);
  965. X+ 
  966. X      /* worst case, at least he'll be peaceful. */
  967. X      mtmp->mpeaceful = 1;
  968. X      if(flags.moonphase == FULL_MOON && night() && rn2(6) && obj
  969. X                          && mtmp->data->mlet == S_DOG)
  970. X!         return((struct monst *)0);
  971. X  
  972. X      /* If we cannot tame him, at least he's no longer afraid. */
  973. X      mtmp->mflee = 0;
  974. X      mtmp->mfleetim = 0;
  975. X      if(mtmp->mtame || !mtmp->mcanmove ||
  976. X         mtmp->isshk || mtmp->isgd ||
  977. X  #if defined(ALTARS) && defined(THEOLOGY)
  978. X         mtmp->ispriest ||
  979. X***************
  980. X*** 334,342 ****
  981. X  #else
  982. X         is_human(mtmp->data) || is_demon(mtmp->data))
  983. X  #endif
  984. X!         return(0);
  985. X      if(obj) {
  986. X!         if(dogfood(mtmp, obj) >= MANFOOD) return(0);
  987. X          if(cansee(mtmp->mx,mtmp->my))
  988. X              pline("%s devours the %s.", Monnam(mtmp), xname(obj));
  989. X          obfree(obj, (struct obj *)0);
  990. X--- 345,353 ----
  991. X  #else
  992. X         is_human(mtmp->data) || is_demon(mtmp->data))
  993. X  #endif
  994. X!         return((struct monst *)0);
  995. X      if(obj) {
  996. X!         if(dogfood(mtmp, obj) >= MANFOOD) return((struct monst *)0);
  997. X          if(cansee(mtmp->mx,mtmp->my))
  998. X              pline("%s devours the %s.", Monnam(mtmp), xname(obj));
  999. X          obfree(obj, (struct obj *)0);
  1000. X***************
  1001. X*** 347,353 ****
  1002. X      if(mtmp->mnamelth) Strcpy(NAME(mtmp2), NAME(mtmp));
  1003. X      initedog(mtmp2);
  1004. X      replmon(mtmp,mtmp2);
  1005. X!     return(1);
  1006. X  }
  1007. X  
  1008. X  #endif /* OVLB */
  1009. X--- 358,364 ----
  1010. X      if(mtmp->mnamelth) Strcpy(NAME(mtmp2), NAME(mtmp));
  1011. X      initedog(mtmp2);
  1012. X      replmon(mtmp,mtmp2);
  1013. X!     return(mtmp2);
  1014. X  }
  1015. X  
  1016. X  #endif /* OVLB */
  1017. X*** src/Old/dogmove.c    Sun Jun  3 12:54:47 1990
  1018. X--- src/dogmove.c    Sat May 26 22:02:35 1990
  1019. X***************
  1020. X*** 9,23 ****
  1021. X  
  1022. X  #ifdef OVL0
  1023. X  
  1024. X! static const char nofetch[] = { BALL_SYM, CHAIN_SYM, ROCK_SYM, 0 };
  1025. X  
  1026. X  #endif /* OVL0 */
  1027. X  
  1028. X! OSTATIC void FDECL(dog_eat, (struct monst *, struct obj *, XCHAR_P, int, int));
  1029. X  
  1030. X  #ifdef OVLB
  1031. X  
  1032. X! XSTATIC void
  1033. X  dog_eat(mtmp, obj, otyp, x, y)
  1034. X  register struct monst *mtmp;
  1035. X  register struct obj * obj;
  1036. X--- 9,23 ----
  1037. X  
  1038. X  #ifdef OVL0
  1039. X  
  1040. X! static const char NEARDATA nofetch[] = { BALL_SYM, CHAIN_SYM, ROCK_SYM, 0 };
  1041. X  
  1042. X  #endif /* OVL0 */
  1043. X  
  1044. X! STATIC_DCL void FDECL(dog_eat, (struct monst *, struct obj *, XCHAR_P, int, int));
  1045. X  
  1046. X  #ifdef OVLB
  1047. X  
  1048. X! STATIC_OVL void
  1049. X  dog_eat(mtmp, obj, otyp, x, y)
  1050. X  register struct monst *mtmp;
  1051. X  register struct obj * obj;
  1052. X***************
  1053. X*** 140,146 ****
  1054. X              edog->droptime = moves;
  1055. X          }
  1056. X      } else {
  1057. X!         if((obj=level.objects[omx][omy]) && !index(nofetch,obj->olet)){
  1058. X              if((otyp = dogfood(mtmp, obj)) <= CADAVER){
  1059. X              nix = omx;
  1060. X              niy = omy;
  1061. X--- 140,150 ----
  1062. X              edog->droptime = moves;
  1063. X          }
  1064. X      } else {
  1065. X!         if((obj=level.objects[omx][omy]) && !index(nofetch,obj->olet)
  1066. X! #ifdef MAIL
  1067. X!             && obj->otyp != SCR_MAIL
  1068. X! #endif
  1069. X!                                     ){
  1070. X              if((otyp = dogfood(mtmp, obj)) <= CADAVER){
  1071. X              nix = omx;
  1072. X              niy = omy;
  1073. X***************
  1074. X*** 353,361 ****
  1075. X  #ifdef WALKIES
  1076. X              if(mtmp->mleashed) { /* play it safe */
  1077. X                  pline("%s breaks loose of %s leash!", 
  1078. X                      is_female(mtmp) ? "her" :
  1079. X!                     is_human(mtmp->data) ? "his" : "its",
  1080. X!                     Monnam(mtmp));
  1081. X                  m_unleash(mtmp);
  1082. X              }
  1083. X  #endif
  1084. X--- 357,365 ----
  1085. X  #ifdef WALKIES
  1086. X              if(mtmp->mleashed) { /* play it safe */
  1087. X                  pline("%s breaks loose of %s leash!", 
  1088. X+                     Monnam(mtmp),
  1089. X                      is_female(mtmp) ? "her" :
  1090. X!                     is_human(mtmp->data) ? "his" : "its");
  1091. X                  m_unleash(mtmp);
  1092. X              }
  1093. X  #endif
  1094. X*** src/Old/dokick.c    Sun Jun  3 12:55:09 1990
  1095. X--- src/dokick.c    Sat May 12 16:06:36 1990
  1096. X***************
  1097. X*** 7,13 ****
  1098. X  
  1099. X  #define martial()    ((pl_character[0] == 'S' || pl_character[0] == 'P'))
  1100. X  
  1101. X! static struct rm *maploc;
  1102. X  
  1103. X  #ifdef KICK
  1104. X  
  1105. X--- 7,13 ----
  1106. X  
  1107. X  #define martial()    ((pl_character[0] == 'S' || pl_character[0] == 'P'))
  1108. X  
  1109. X! static struct rm NEARDATA *maploc;
  1110. X  
  1111. X  #ifdef KICK
  1112. X  
  1113. X***************
  1114. X*** 18,25 ****
  1115. X  static void FDECL(kickdmg, (struct monst *, BOOLEAN_P));
  1116. X  static void FDECL(kick_monster, (int, int));
  1117. X  static int FDECL(kick_object, (int, int));
  1118. X  
  1119. X! static struct obj *obj = (struct obj *) 0;
  1120. X  
  1121. X  static void
  1122. X  kickdmg(mon, clumsy)
  1123. X--- 18,26 ----
  1124. X  static void FDECL(kickdmg, (struct monst *, BOOLEAN_P));
  1125. X  static void FDECL(kick_monster, (int, int));
  1126. X  static int FDECL(kick_object, (int, int));
  1127. X+ static char *NDECL(kickstr);
  1128. X  
  1129. X! static struct obj NEARDATA *kickobj;
  1130. X  
  1131. X  static void
  1132. X  kickdmg(mon, clumsy)
  1133. X***************
  1134. X*** 298,310 ****
  1135. X      for (otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere)
  1136. X          if(!otmp->cobj) {
  1137. X              cnt++;
  1138. X!             if(cnt == 1) obj = otmp;
  1139. X          }
  1140. X  
  1141. X      /* range < 2 means the object will not move.    */
  1142. X      /* maybe dexterity should also figure here.     */
  1143. X      if(cnt) range = (int)((ACURR(A_STR) > 18 ? 20 : 
  1144. X!                 ACURR(A_STR))/2 - obj->owt/4);
  1145. X      else range = rnd((int)ACURR(A_STR));
  1146. X  
  1147. X      if(martial()) range = range + rnd(3);
  1148. X--- 299,311 ----
  1149. X      for (otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere)
  1150. X          if(!otmp->cobj) {
  1151. X              cnt++;
  1152. X!             if(cnt == 1) kickobj = otmp;
  1153. X          }
  1154. X  
  1155. X      /* range < 2 means the object will not move.    */
  1156. X      /* maybe dexterity should also figure here.     */
  1157. X      if(cnt) range = (int)((ACURR(A_STR) > 18 ? 20 : 
  1158. X!                 ACURR(A_STR))/2 - kickobj->owt/4);
  1159. X      else range = rnd((int)ACURR(A_STR));
  1160. X  
  1161. X      if(martial()) range = range + rnd(3);
  1162. X***************
  1163. X*** 360,384 ****
  1164. X          return(1);
  1165. X      }
  1166. X  
  1167. X!     /* cnt should always be >= 1 here (meaning obj is set) due to
  1168. X       * conditions of call */
  1169. X!     if(!cnt || obj->otyp == BOULDER || obj == uball || obj == uchain)
  1170. X          return(0);
  1171. X  
  1172. X      /* a box gets a chance of breaking open here */
  1173. X!     if(Is_box(obj)) {
  1174. X!         boolean otrp = obj->otrapped;
  1175. X  
  1176. X!         if (!obj->olocked && (!rn2(3) ||
  1177. X                      (martial() && !rn2(2)))) {
  1178. X              pline("The lid slams open, then falls shut.");
  1179. X!             if(otrp) chest_trap(obj, LEG);
  1180. X              return(1);
  1181. X!         } else if (obj->olocked && 
  1182. X                  (!rn2(5) || (martial() && !rn2(2)))) {
  1183. X              You("break open the lock!");
  1184. X!             obj->olocked = 0;
  1185. X!                 if(otrp) chest_trap(obj, LEG);
  1186. X              return(1);
  1187. X          }
  1188. X          /* let it fall through to the next cases... */
  1189. X--- 361,386 ----
  1190. X          return(1);
  1191. X      }
  1192. X  
  1193. X!     /* cnt should always be >= 1 here (meaning kickobj is set) due to
  1194. X       * conditions of call */
  1195. X!     if(!cnt || kickobj->otyp == BOULDER
  1196. X!             || kickobj == uball || kickobj == uchain)
  1197. X          return(0);
  1198. X  
  1199. X      /* a box gets a chance of breaking open here */
  1200. X!     if(Is_box(kickobj)) {
  1201. X!         boolean otrp = kickobj->otrapped;
  1202. X  
  1203. X!         if (!kickobj->olocked && (!rn2(3) ||
  1204. X                      (martial() && !rn2(2)))) {
  1205. X              pline("The lid slams open, then falls shut.");
  1206. X!             if(otrp) chest_trap(kickobj, LEG);
  1207. X              return(1);
  1208. X!         } else if (kickobj->olocked && 
  1209. X                  (!rn2(5) || (martial() && !rn2(2)))) {
  1210. X              You("break open the lock!");
  1211. X!             kickobj->olocked = 0;
  1212. X!                 if(otrp) chest_trap(kickobj, LEG);
  1213. X              return(1);
  1214. X          }
  1215. X          /* let it fall through to the next cases... */
  1216. X***************
  1217. X*** 390,405 ****
  1218. X      }
  1219. X  
  1220. X      /* fragile objects should not be kicked */
  1221. X!     if (breaks(obj, FALSE)) return(1);
  1222. X  
  1223. X      costly = costly_spot(x, y);
  1224. X  
  1225. X      /* potions get a chance of breaking here */
  1226. X!     if(obj->olet == POTION_SYM) {
  1227. X          if(rn2(2)) {
  1228. X!             You("smash %s %s!", obj->quan==1 ? "the" : "a", xname(obj));
  1229. X!             potionbreathe(obj);
  1230. X!             useupf(obj);
  1231. X              return(1);
  1232. X          }
  1233. X      }
  1234. X--- 392,408 ----
  1235. X      }
  1236. X  
  1237. X      /* fragile objects should not be kicked */
  1238. X!     if (breaks(kickobj, FALSE)) return(1);
  1239. X  
  1240. X      costly = costly_spot(x, y);
  1241. X  
  1242. X      /* potions get a chance of breaking here */
  1243. X!     if(kickobj->olet == POTION_SYM) {
  1244. X          if(rn2(2)) {
  1245. X!             You("smash %s %s!",
  1246. X!                 kickobj->quan==1 ? "the" : "a", xname(kickobj));
  1247. X!             potionbreathe(kickobj);
  1248. X!             useupf(kickobj);
  1249. X              return(1);
  1250. X          }
  1251. X      }
  1252. X***************
  1253. X*** 412,433 ****
  1254. X                                  ) {
  1255. X              if (Blind) pline("It doesn't come loose.");
  1256. X              else pline("The %s do%sn't come loose.",
  1257. X!                 distant_name(obj, xname),
  1258. X!                 (obj->quan==1) ? "es" : "");
  1259. X              return(!rn2(3) || martial());
  1260. X          }
  1261. X          if (Blind) pline("It comes loose.");
  1262. X!         else pline("The %s come%s loose.", distant_name(obj, xname),
  1263. X!             (obj->quan==1) ? "s" : "");
  1264. X!         move_object(obj, u.ux, u.uy);
  1265. X          newsym(x, y);
  1266. X!         stackobj(obj);
  1267. X          if (Invisible
  1268. X  #ifdef POLYSELF
  1269. X                  && !u.uundetected
  1270. X  #endif
  1271. X                          ) newsym(u.ux, u.uy);
  1272. X!         if (costly && !costly_spot(u.ux, u.uy)) addtobill(obj, FALSE);
  1273. X          return(1);
  1274. X      }
  1275. X  
  1276. X--- 415,437 ----
  1277. X                                  ) {
  1278. X              if (Blind) pline("It doesn't come loose.");
  1279. X              else pline("The %s do%sn't come loose.",
  1280. X!                 distant_name(kickobj, xname),
  1281. X!                 (kickobj->quan==1) ? "es" : "");
  1282. X              return(!rn2(3) || martial());
  1283. X          }
  1284. X          if (Blind) pline("It comes loose.");
  1285. X!         else pline("The %s come%s loose.", distant_name(kickobj, xname),
  1286. X!             (kickobj->quan==1) ? "s" : "");
  1287. X!         move_object(kickobj, u.ux, u.uy);
  1288. X          newsym(x, y);
  1289. X!         stackobj(kickobj);
  1290. X          if (Invisible
  1291. X  #ifdef POLYSELF
  1292. X                  && !u.uundetected
  1293. X  #endif
  1294. X                          ) newsym(u.ux, u.uy);
  1295. X!         if (costly && !costly_spot(u.ux, u.uy))
  1296. X!             addtobill(kickobj, FALSE);
  1297. X          return(1);
  1298. X      }
  1299. X  
  1300. X***************
  1301. X*** 435,459 ****
  1302. X      /* in this function when range < 2 (a display bug */
  1303. X      /* results otherwise).                */
  1304. X      if(range <= 2) {
  1305. X!         if(Is_box(obj)) pline("THUD!");
  1306. X          else pline("Thump!");
  1307. X          if(!rn2(3) || martial()) return(1);
  1308. X          return(0);
  1309. X      }
  1310. X  
  1311. X!     if (obj->quan > 1) (void) splitobj(obj, 1);
  1312. X  
  1313. X      /* Needed to fool bhit's display-cleanup to show immediately    */
  1314. X      /* the next object in the pile.  We know here that the object    */
  1315. X      /* will move, so there is no need to worry about the location,    */
  1316. X      /* which merely needs to be something other than ox, oy.    */
  1317. X!     move_object(obj, u.ux, u.uy);
  1318. X      if(cnt == 1 && !MON_AT(x, y))
  1319. X          newsym(x, y);
  1320. X  
  1321. X!     mon = bhit(u.dx, u.dy, range, obj->olet,
  1322. X!             (int (*)()) 0, (int (*)()) 0, obj);
  1323. X!     freeobj(obj);
  1324. X      if(mon) {
  1325. X  # ifdef WORM
  1326. X          if (mon->mx != bhitpos.x || mon->my != bhitpos.y)
  1327. X--- 439,463 ----
  1328. X      /* in this function when range < 2 (a display bug */
  1329. X      /* results otherwise).                */
  1330. X      if(range <= 2) {
  1331. X!         if(Is_box(kickobj)) pline("THUD!");
  1332. X          else pline("Thump!");
  1333. X          if(!rn2(3) || martial()) return(1);
  1334. X          return(0);
  1335. X      }
  1336. X  
  1337. X!     if (kickobj->quan > 1) (void) splitobj(kickobj, 1);
  1338. X  
  1339. X      /* Needed to fool bhit's display-cleanup to show immediately    */
  1340. X      /* the next object in the pile.  We know here that the object    */
  1341. X      /* will move, so there is no need to worry about the location,    */
  1342. X      /* which merely needs to be something other than ox, oy.    */
  1343. X!     move_object(kickobj, u.ux, u.uy);
  1344. X      if(cnt == 1 && !MON_AT(x, y))
  1345. X          newsym(x, y);
  1346. X  
  1347. X!     mon = bhit(u.dx, u.dy, range, kickobj->olet,
  1348. X!             (int (*)()) 0, (int (*)()) 0, kickobj);
  1349. X!     freeobj(kickobj);
  1350. X      if(mon) {
  1351. X  # ifdef WORM
  1352. X          if (mon->mx != bhitpos.x || mon->my != bhitpos.y)
  1353. X***************
  1354. X*** 461,488 ****
  1355. X  # endif
  1356. X          /* awake monster if sleeping */
  1357. X          wakeup(mon);
  1358. X!         if(thitmonst(mon, obj)) return(1);
  1359. X      }
  1360. X!     if(costly && !costly_spot(bhitpos.x,bhitpos.y)) addtobill(obj, FALSE);
  1361. X!     move_object(obj, bhitpos.x, bhitpos.y);
  1362. X!     obj->nobj = fobj;
  1363. X!     fobj = obj;
  1364. X!     stackobj(obj);
  1365. X!     if(!MON_AT(obj->ox, obj->oy))
  1366. X!         newsym(obj->ox, obj->oy);
  1367. X      return(1);
  1368. X  }
  1369. X- #endif /* KICK */
  1370. X  
  1371. X! char *
  1372. X  kickstr() {
  1373. X!     static char buf[BUFSIZ];
  1374. X  
  1375. X! #ifdef KICK
  1376. X!     if (obj) Sprintf(buf, "kicking %s", doname(obj));
  1377. X!     else
  1378. X! #endif
  1379. X!     if (IS_STWALL(maploc->typ)) Strcpy(buf, "kicking a wall");
  1380. X      else if (IS_ROCK(maploc->typ)) Strcpy(buf, "kicking a rock");
  1381. X  #ifdef THRONES
  1382. X      else if (IS_THRONE(maploc->typ)) Strcpy(buf, "kicking a throne");
  1383. X--- 465,489 ----
  1384. X  # endif
  1385. X          /* awake monster if sleeping */
  1386. X          wakeup(mon);
  1387. X!         if(thitmonst(mon, kickobj)) return(1);
  1388. X      }
  1389. X!     if(costly && !costly_spot(bhitpos.x,bhitpos.y))
  1390. X!         addtobill(kickobj, FALSE);
  1391. X!     move_object(kickobj, bhitpos.x, bhitpos.y);
  1392. X!     kickobj->nobj = fobj;
  1393. X!     fobj = kickobj;
  1394. X!     stackobj(kickobj);
  1395. X!     if(!MON_AT(kickobj->ox, kickobj->oy))
  1396. X!         newsym(kickobj->ox, kickobj->oy);
  1397. X      return(1);
  1398. X  }
  1399. X  
  1400. X! static char *
  1401. X  kickstr() {
  1402. X!     static char NEARDATA buf[BUFSIZ];
  1403. X  
  1404. X!     if (kickobj) Sprintf(buf, "kicking %s", doname(kickobj));
  1405. X!     else if (IS_STWALL(maploc->typ)) Strcpy(buf, "kicking a wall");
  1406. X      else if (IS_ROCK(maploc->typ)) Strcpy(buf, "kicking a rock");
  1407. X  #ifdef THRONES
  1408. X      else if (IS_THRONE(maploc->typ)) Strcpy(buf, "kicking a throne");
  1409. X***************
  1410. X*** 512,520 ****
  1411. X  
  1412. X      return buf;
  1413. X  }
  1414. X  
  1415. X  int
  1416. X! dokick() {        /* try to kick the door down - noisy! */
  1417. X          register int x, y;
  1418. X      register int avrg_attrib = (ACURR(A_STR)+ACURR(A_DEX)+ACURR(A_CON))/3;
  1419. X  
  1420. X--- 513,522 ----
  1421. X  
  1422. X      return buf;
  1423. X  }
  1424. X+ #endif /* KICK */
  1425. X  
  1426. X  int
  1427. X! dokick() {
  1428. X          register int x, y;
  1429. X      register int avrg_attrib = (ACURR(A_STR)+ACURR(A_DEX)+ACURR(A_CON))/3;
  1430. X  
  1431. X***************
  1432. X*** 586,591 ****
  1433. X--- 588,594 ----
  1434. X          return(1);
  1435. X      }
  1436. X  
  1437. X+     kickobj = (struct obj *)0;
  1438. X      if((OBJ_AT(x, y) || maploc->gmask) && !Levitation) {
  1439. X          if(kick_object(x, y)) return(1);
  1440. X          else goto ouch;
  1441. X***************
  1442. X*** 630,644 ****
  1443. X              mkgold((300L+(long)rn2(201)), x, y);
  1444. X              i = Luck + 1;
  1445. X              if(i > 6) i = 6;
  1446. X!             while(i--) (void) mkobj_at(GEM_SYM, x, y);
  1447. X              prl(x, y);
  1448. X              /* prevent endless milking */
  1449. X              maploc->looted = T_LOOTED;
  1450. X              return(1);
  1451. X              } else if (!rn2(4)) {
  1452. X!             register struct trap *ttmp = 
  1453. X!                     maketrap(u.ux,u.uy,TRAPDOOR);
  1454. X!             dotrap(ttmp);
  1455. X              return(1);
  1456. X              }
  1457. X              goto ouch;
  1458. X--- 633,645 ----
  1459. X              mkgold((300L+(long)rn2(201)), x, y);
  1460. X              i = Luck + 1;
  1461. X              if(i > 6) i = 6;
  1462. X!             while(i--) (void) mkobj_at(GEM_SYM, x, y, TRUE);
  1463. X              prl(x, y);
  1464. X              /* prevent endless milking */
  1465. X              maploc->looted = T_LOOTED;
  1466. X              return(1);
  1467. X              } else if (!rn2(4)) {
  1468. X!             fall_through(FALSE);
  1469. X              return(1);
  1470. X              }
  1471. X              goto ouch;
  1472. X***************
  1473. X*** 683,689 ****
  1474. X              if(!maploc->looted) { /* only once per sink */
  1475. X                  if(!Blind) 
  1476. X                  You("see a ring shining in its midst.");
  1477. X!                 (void) mkobj_at(RING_SYM, x, y);
  1478. X                  prl(x, y);
  1479. X                  maploc->looted = T_LOOTED;
  1480. X              }
  1481. X--- 684,690 ----
  1482. X              if(!maploc->looted) { /* only once per sink */
  1483. X                  if(!Blind) 
  1484. X                  You("see a ring shining in its midst.");
  1485. X!                 (void) mkobj_at(RING_SYM, x, y, TRUE);
  1486. X                  prl(x, y);
  1487. X                  maploc->looted = T_LOOTED;
  1488. X              }
  1489. X*** src/Old/dothrow.c    Sun Jun  3 12:55:40 1990
  1490. X--- src/dothrow.c    Wed May  9 18:39:53 1990
  1491. X***************
  1492. X*** 10,16 ****
  1493. X  static void FDECL(gem_accept, (struct monst *, struct obj *));
  1494. X  static boolean NDECL(martial);
  1495. X  static int FDECL(throw_gold, (struct obj *));
  1496. X! static const char toss_objs[] = { '0', GOLD_SYM, '#', WEAPON_SYM, 0 };
  1497. X  #ifdef WORM
  1498. X  extern boolean notonhead;
  1499. X  #endif
  1500. X--- 10,16 ----
  1501. X  static void FDECL(gem_accept, (struct monst *, struct obj *));
  1502. X  static boolean NDECL(martial);
  1503. X  static int FDECL(throw_gold, (struct obj *));
  1504. X! static const char NEARDATA toss_objs[] = { '0', GOLD_SYM, '#', WEAPON_SYM, 0 };
  1505. X  #ifdef WORM
  1506. X  extern boolean notonhead;
  1507. X  #endif
  1508. X***************
  1509. X*** 253,266 ****
  1510. X      if (u.uswallow && mon == u.ustuck) tmp += 1000; /* Guaranteed hit */
  1511. X  
  1512. X      if(obj->olet == GEM_SYM && mon->data->mlet == S_UNICORN) {
  1513. X!         if (mon->mtame)
  1514. X              kludge("%s catches and drops the %s.",
  1515. X                  Monnam(mon), xname(obj));
  1516. X!         else {
  1517. X              kludge("%s catches the %s.", Monnam(mon), xname(obj));
  1518. X              gem_accept(mon, obj);
  1519. X          }
  1520. X-         return(1);
  1521. X      }
  1522. X      if(obj->olet == WEAPON_SYM || obj->otyp == PICK_AXE ||
  1523. X         obj->otyp == UNICORN_HORN || obj->olet == GEM_SYM) {
  1524. X--- 253,267 ----
  1525. X      if (u.uswallow && mon == u.ustuck) tmp += 1000; /* Guaranteed hit */
  1526. X  
  1527. X      if(obj->olet == GEM_SYM && mon->data->mlet == S_UNICORN) {
  1528. X!         if (mon->mtame) {
  1529. X              kludge("%s catches and drops the %s.",
  1530. X                  Monnam(mon), xname(obj));
  1531. X!             return(0);
  1532. X!         } else {
  1533. X              kludge("%s catches the %s.", Monnam(mon), xname(obj));
  1534. X              gem_accept(mon, obj);
  1535. X+             return(1);
  1536. X          }
  1537. X      }
  1538. X      if(obj->olet == WEAPON_SYM || obj->otyp == PICK_AXE ||
  1539. X         obj->otyp == UNICORN_HORN || obj->olet == GEM_SYM) {
  1540. X***************
  1541. X*** 329,337 ****
  1542. X  register struct obj *obj;
  1543. X  {
  1544. X      char buf[BUFSZ];
  1545. X!     static const char nogood[] = " is not interested in your junk.";
  1546. X!     static const char maybeluck[] = " hesitatingly accepts your gift.";
  1547. X!     static const char addluck[] = " graciously accepts your gift.";
  1548. X  
  1549. X      Strcpy(buf,Monnam(mon));
  1550. X  
  1551. X--- 330,338 ----
  1552. X  register struct obj *obj;
  1553. X  {
  1554. X      char buf[BUFSZ];
  1555. X!     static const char NEARDATA nogood[] = " is not interested in your junk.";
  1556. X!     static const char NEARDATA maybeluck[] = " hesitatingly accepts your gift.";
  1557. X!     static const char NEARDATA addluck[] = " graciously accepts your gift.";
  1558. X  
  1559. X      Strcpy(buf,Monnam(mon));
  1560. X  
  1561. X*** src/Old/eat.c    Sun Jun  3 12:56:06 1990
  1562. X--- src/eat.c    Thu May 31 22:10:51 1990
  1563. X***************
  1564. X*** 13,55 ****
  1565. X  # endif
  1566. X  #endif
  1567. X  
  1568. X! static long FDECL(rounddiv, (long, long));
  1569. X! #ifndef OVERLAY
  1570. X! static int NDECL(Meatdone);
  1571. X! #endif
  1572. X  static void FDECL(choke, (struct obj *));
  1573. X  static void NDECL(recalc_wt);
  1574. X  static struct obj *FDECL(touchfood, (struct obj *));
  1575. X  static void NDECL(do_reset_eat);
  1576. X- #ifndef OVERLAY
  1577. X- static int NDECL(eatfood);
  1578. X- #endif
  1579. X  static void FDECL(done_eating, (BOOLEAN_P));
  1580. X  static void FDECL(cprefx, (int));
  1581. X  static void FDECL(cpostfx, (int));
  1582. X- #ifndef OVERLAY
  1583. X- static int NDECL(opentin);
  1584. X- #endif
  1585. X  static void FDECL(start_tin, (struct obj *));
  1586. X- #ifdef POLYSELF
  1587. X- static int FDECL(rottenfood, (struct obj *));
  1588. X- #else
  1589. X- static int NDECL(rottenfood);
  1590. X- #endif
  1591. X  static int FDECL(eatcorpse, (struct obj *));
  1592. X  static void FDECL(start_eating, (struct obj *));
  1593. X  static void FDECL(fprefx, (struct obj *));
  1594. X- #ifdef POLYSELF
  1595. X- static void NDECL(eatspecial);
  1596. X- static const char * FDECL(foodword, (struct obj *));
  1597. X- #endif
  1598. X  static void FDECL(fpostfx, (struct obj *));
  1599. X  static int NDECL(bite);
  1600. X- #ifndef OVERLAY
  1601. X- static int NDECL(unfaint);
  1602. X- #endif
  1603. X  
  1604. X! #ifdef OVLB
  1605. X  
  1606. X  char corpsename[60];
  1607. X  char msgbuf[BUFSZ];
  1608. X--- 13,46 ----
  1609. X  # endif
  1610. X  #endif
  1611. X  
  1612. X! STATIC_PTR int NDECL(Meatdone);
  1613. X! STATIC_PTR int NDECL(eatfood);
  1614. X! STATIC_PTR int NDECL(opentin);
  1615. X! STATIC_PTR int NDECL(unfaint);
  1616. X! 
  1617. X! #ifdef OVLB
  1618. X! static int FDECL(rounddiv, (long, int));
  1619. X  static void FDECL(choke, (struct obj *));
  1620. X  static void NDECL(recalc_wt);
  1621. X  static struct obj *FDECL(touchfood, (struct obj *));
  1622. X  static void NDECL(do_reset_eat);
  1623. X  static void FDECL(done_eating, (BOOLEAN_P));
  1624. X  static void FDECL(cprefx, (int));
  1625. X  static void FDECL(cpostfx, (int));
  1626. X  static void FDECL(start_tin, (struct obj *));
  1627. X  static int FDECL(eatcorpse, (struct obj *));
  1628. X  static void FDECL(start_eating, (struct obj *));
  1629. X  static void FDECL(fprefx, (struct obj *));
  1630. X  static void FDECL(fpostfx, (struct obj *));
  1631. X  static int NDECL(bite);
  1632. X  
  1633. X! #ifdef POLYSELF
  1634. X! static int FDECL(rottenfood, (struct obj *));
  1635. X! static void NDECL(eatspecial);
  1636. X! static const char * FDECL(foodword, (struct obj *));
  1637. X! #else
  1638. X! static int NDECL(rottenfood);
  1639. X! #endif /* POLYSELF */
  1640. X  
  1641. X  char corpsename[60];
  1642. X  char msgbuf[BUFSZ];
  1643. X***************
  1644. X*** 77,92 ****
  1645. X      "Starved "
  1646. X  };
  1647. X  
  1648. X! static const char comestibles[] = { FOOD_SYM, 0 };
  1649. X  #ifdef POLYSELF
  1650. X! static const char everything[] = { GOLD_SYM, /* must come first */
  1651. X      WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1652. X! #ifdef SPELLS
  1653. X      SPBOOK_SYM,
  1654. X! #endif
  1655. X      RING_SYM, WAND_SYM, AMULET_SYM, FOOD_SYM, TOOL_SYM, GEM_SYM,
  1656. X      ROCK_SYM, BALL_SYM, CHAIN_SYM, 0 };
  1657. X  
  1658. X  boolean
  1659. X  is_edible(obj)
  1660. X  register struct obj *obj;
  1661. X--- 68,96 ----
  1662. X      "Starved "
  1663. X  };
  1664. X  
  1665. X! #endif /* OVLB */
  1666. X! 
  1667. X! #ifndef OVLB
  1668. X! 
  1669. X! STATIC_DCL const char NEARDATA comestibles[];
  1670. X! 
  1671. X! #else
  1672. X! 
  1673. X! STATIC_OVL const char NEARDATA comestibles[] = { FOOD_SYM, 0 };
  1674. X  #ifdef POLYSELF
  1675. X! STATIC_OVL const char NEARDATA everything[] = { GOLD_SYM, /* must come first */
  1676. X      WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1677. X! # ifdef SPELLS
  1678. X      SPBOOK_SYM,
  1679. X! # endif
  1680. X      RING_SYM, WAND_SYM, AMULET_SYM, FOOD_SYM, TOOL_SYM, GEM_SYM,
  1681. X      ROCK_SYM, BALL_SYM, CHAIN_SYM, 0 };
  1682. X  
  1683. X+ #endif /* POLYSELF */
  1684. X+ #endif /* OVLB */
  1685. X+ #ifdef OVL1
  1686. X+ # ifdef POLYSELF
  1687. X+ 
  1688. X  boolean
  1689. X  is_edible(obj)
  1690. X  register struct obj *obj;
  1691. X***************
  1692. X*** 100,115 ****
  1693. X          return TRUE;
  1694. X      return !!index(comestibles, obj->olet);
  1695. X  }
  1696. X! #endif
  1697. X  
  1698. X  /* calculate x/y, rounding as appropriate */
  1699. X  
  1700. X! static long
  1701. X  rounddiv(x, y)
  1702. X! long x, y;
  1703. X  {
  1704. X      int divsgn = 1;
  1705. X!     long r, m;
  1706. X  
  1707. X      if (y == 0)
  1708. X          panic("division by zero in rounddiv");
  1709. X--- 104,122 ----
  1710. X          return TRUE;
  1711. X      return !!index(comestibles, obj->olet);
  1712. X  }
  1713. X! # endif /* POLYSELF */
  1714. X! #endif /* OVL1 */
  1715. X! #ifdef OVLB
  1716. X  
  1717. X  /* calculate x/y, rounding as appropriate */
  1718. X  
  1719. X! static int
  1720. X  rounddiv(x, y)
  1721. X! long x;
  1722. X! int y;
  1723. X  {
  1724. X      int divsgn = 1;
  1725. X!     int r, m;
  1726. X  
  1727. X      if (y == 0)
  1728. X          panic("division by zero in rounddiv");
  1729. X***************
  1730. X*** 145,151 ****
  1731. X  static struct {
  1732. X      struct    obj *tin;
  1733. X      int    usedtime, reqtime;
  1734. X! } tin;
  1735. X  
  1736. X  static struct {
  1737. X      struct    obj *piece;    /* the thing being eaten, or last thing that
  1738. X--- 152,158 ----
  1739. X  static struct {
  1740. X      struct    obj *tin;
  1741. X      int    usedtime, reqtime;
  1742. X! } NEARDATA tin;
  1743. X  
  1744. X  static struct {
  1745. X      struct    obj *piece;    /* the thing being eaten, or last thing that
  1746. X***************
  1747. X*** 158,168 ****
  1748. X      Bitfield(fullwarn,1);    /* have warned about being full */
  1749. X      Bitfield(eating,1);    /* victual currently being eaten */
  1750. X      Bitfield(doreset,1);    /* stop eating at end of turn */
  1751. X! } victual;
  1752. X  
  1753. X! #ifndef OVERLAY
  1754. X! static 
  1755. X! #endif
  1756. X  int
  1757. X  Meatdone() {        /* called after mimicing is over */
  1758. X      u.usym =
  1759. X--- 165,173 ----
  1760. X      Bitfield(fullwarn,1);    /* have warned about being full */
  1761. X      Bitfield(eating,1);    /* victual currently being eaten */
  1762. X      Bitfield(doreset,1);    /* stop eating at end of turn */
  1763. X! } NEARDATA victual;
  1764. X  
  1765. X! STATIC_PTR
  1766. X  int
  1767. X  Meatdone() {        /* called after mimicing is over */
  1768. X      u.usym =
  1769. X***************
  1770. X*** 308,316 ****
  1771. X      stop_occupation();
  1772. X  }
  1773. X  
  1774. X! #ifndef OVERLAY
  1775. X! static 
  1776. X! #endif
  1777. X  int
  1778. X  eatfood() {        /* called each move during eating process */
  1779. X      if(!carried(victual.piece) && !obj_here(victual.piece, u.ux, u.uy)) {
  1780. X--- 313,319 ----
  1781. X      stop_occupation();
  1782. X  }
  1783. X  
  1784. X! STATIC_PTR
  1785. X  int
  1786. X  eatfood() {        /* called each move during eating process */
  1787. X      if(!carried(victual.piece) && !obj_here(victual.piece, u.ux, u.uy)) {
  1788. X***************
  1789. X*** 563,571 ****
  1790. X      return;
  1791. X  }
  1792. X  
  1793. X! #ifndef OVERLAY
  1794. X! static 
  1795. X! #endif
  1796. X  int
  1797. X  opentin()        /* called during each move whilst opening a tin */
  1798. X  {
  1799. X--- 566,572 ----
  1800. X      return;
  1801. X  }
  1802. X  
  1803. X! STATIC_PTR
  1804. X  int
  1805. X  opentin()        /* called during each move whilst opening a tin */
  1806. X  {
  1807. X***************
  1808. X*** 580,591 ****
  1809. X      }
  1810. X      if(tin.usedtime < tin.reqtime)
  1811. X          return(1);        /* still busy */
  1812. X!     if(tin.tin->cursed && !rn2(8)) {
  1813. X          b_trapped("tin");
  1814. X          goto use_me;
  1815. X      }
  1816. X      You("succeed in opening the tin.");
  1817. X!     if(!tin.tin->spe) {
  1818. X          if(tin.tin->corpsenm == -1) {
  1819. X          pline("It turns out to be empty.");
  1820. X          tin.tin->dknown = tin.tin->known = TRUE;
  1821. X--- 581,592 ----
  1822. X      }
  1823. X      if(tin.usedtime < tin.reqtime)
  1824. X          return(1);        /* still busy */
  1825. X!     if(tin.tin->cursed && tin.tin->spe != -1 && !rn2(8)) {
  1826. X          b_trapped("tin");
  1827. X          goto use_me;
  1828. X      }
  1829. X      You("succeed in opening the tin.");
  1830. X!     if(tin.tin->spe != 1) {
  1831. X          if(tin.tin->corpsenm == -1) {
  1832. X          pline("It turns out to be empty.");
  1833. X          tin.tin->dknown = tin.tin->known = TRUE;
  1834. X***************
  1835. X*** 592,605 ****
  1836. X--- 593,618 ----
  1837. X          goto use_me;
  1838. X          }
  1839. X          r = tin.tin->cursed ? 4 : rn2(TTSZ-1); /* Always rotten if cursed */
  1840. X+ #ifdef MACOS
  1841. X+     {
  1842. X+         char tmp[128];
  1843. X+         if(!flags.silent) SysBeep(20);
  1844. X+         Sprintf(tmp, "It smells like %s. Eat it ?", makeplural(
  1845. X+           Hallucination ? rndmonnam() : mons[tin.tin->corpsenm].mname));
  1846. X+         if(UseMacAlertText(128, tmp) == 2) {
  1847. X+ #else
  1848. X          pline("It smells like %s.", makeplural(
  1849. X            Hallucination ? rndmonnam() : mons[tin.tin->corpsenm].mname));
  1850. X          pline("Eat it? ");
  1851. X          if (yn() == 'n') {
  1852. X+ #endif
  1853. X          if (!Hallucination) tin.tin->dknown = tin.tin->known = TRUE;
  1854. X          if (flags.verbose) You("discard the open tin.");
  1855. X          goto use_me;
  1856. X          }
  1857. X+ #ifdef MACOS
  1858. X+     }
  1859. X+ #endif
  1860. X          You("consume %s %s.", tintxts[r].txt,
  1861. X            mons[tin.tin->corpsenm].mname);
  1862. X          tin.tin->dknown = tin.tin->known = TRUE;
  1863. X***************
  1864. X*** 615,621 ****
  1865. X--- 628,645 ----
  1866. X              makeplural(body_part(FINGER)));
  1867. X          }
  1868. X      } else {
  1869. X+ #ifdef MACOS
  1870. X+     {
  1871. X+         char tmp[128];
  1872. X+         if(!flags.silent) SysBeep(20);
  1873. X          if (tin.tin->cursed)
  1874. X+         Sprintf(tmp, "It contains some decaying %s substance. Eat it ?",
  1875. X+             Hallucination ? hcolor() : green);
  1876. X+         else
  1877. X+         Sprintf(tmp, "It contains spinach. Eat it ?");
  1878. X+         if(UseMacAlertText(128, tmp) == 2) {
  1879. X+ #else
  1880. X+         if (tin.tin->cursed)
  1881. X          pline("It contains some decaying %s substance.",
  1882. X              Hallucination ? hcolor() : green);
  1883. X          else
  1884. X***************
  1885. X*** 623,628 ****
  1886. X--- 647,653 ----
  1887. X  
  1888. X          pline("Eat it? ");
  1889. X          if (yn() == 'n') {
  1890. X+ #endif
  1891. X          if (!Hallucination && !tin.tin->cursed)
  1892. X              tin.tin->dknown = tin.tin->known = TRUE;
  1893. X          if (flags.verbose)
  1894. X***************
  1895. X*** 629,634 ****
  1896. X--- 654,662 ----
  1897. X              You("discard the open tin.");
  1898. X          goto use_me;
  1899. X          }
  1900. X+ #ifdef MACOS
  1901. X+     }
  1902. X+ #endif
  1903. X          if (!tin.tin->cursed)
  1904. X          pline("This makes you feel like %s!",
  1905. X                Hallucination ? "Swee'pea" : "Popeye");
  1906. X***************
  1907. X*** 926,932 ****
  1908. X          } else 
  1909. X  #endif
  1910. X          {
  1911. X!             int oldquan = otmp->quan;
  1912. X              otmp->quan = 1;
  1913. X              pline("This %s is %s!", xname(otmp),
  1914. X                otmp->cursed ? (Hallucination ? "grody" : "terrible"):
  1915. X--- 954,960 ----
  1916. X          } else 
  1917. X  #endif
  1918. X          {
  1919. X!             unsigned oldquan = otmp->quan;
  1920. X              otmp->quan = 1;
  1921. X              pline("This %s is %s!", xname(otmp),
  1922. X                otmp->cursed ? (Hallucination ? "grody" : "terrible"):
  1923. X***************
  1924. X*** 956,961 ****
  1925. X--- 984,992 ----
  1926. X      }
  1927. X      if (otmp->olet == POTION_SYM) {
  1928. X          otmp->quan++; /* dopotion() does a useup() */
  1929. X+ #ifdef MACOS
  1930. X+         segments |= SEG_EAT;
  1931. X+ #endif
  1932. X          (void)dopotion(otmp);
  1933. X      }
  1934. X      if (otmp == uball) unpunish();
  1935. X***************
  1936. X*** 1103,1109 ****
  1937. X       */
  1938. X          if (u.uhs != SATIATED) victual.canchoke = FALSE;
  1939. X          if(!carried(victual.piece)) {
  1940. X!         if(victual.piece->quan != 1)
  1941. X              (void) splitobj(victual.piece, 1);
  1942. X          }
  1943. X          You("resume your meal.");
  1944. X--- 1134,1140 ----
  1945. X       */
  1946. X          if (u.uhs != SATIATED) victual.canchoke = FALSE;
  1947. X          if(!carried(victual.piece)) {
  1948. X!         if(victual.piece->quan > 1)
  1949. X              (void) splitobj(victual.piece, 1);
  1950. X          }
  1951. X          You("resume your meal.");
  1952. X***************
  1953. X*** 1157,1163 ****
  1954. X      debug("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit);
  1955. X  #endif
  1956. X      victual.reqtime = (basenutrit == 0 ? 0 :
  1957. X!       (int)rounddiv(victual.reqtime * (long)otmp->oeaten,(long)basenutrit));
  1958. X  #ifdef DEBUG
  1959. X      debug("after rounddiv: victual.reqtime == %d", victual.reqtime);
  1960. X  #endif
  1961. X--- 1188,1194 ----
  1962. X      debug("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit);
  1963. X  #endif
  1964. X      victual.reqtime = (basenutrit == 0 ? 0 :
  1965. X!         rounddiv(victual.reqtime * (long)otmp->oeaten, basenutrit));
  1966. X  #ifdef DEBUG
  1967. X      debug("after rounddiv: victual.reqtime == %d", victual.reqtime);
  1968. X  #endif
  1969. X***************
  1970. X*** 1271,1278 ****
  1971. X          else {
  1972. X              victual.fullwarn = TRUE;
  1973. X              if (victual.canchoke) {
  1974. X              pline("Stop eating? ");
  1975. X!             if(yn() == 'y') reset_eat();
  1976. X              }
  1977. X          }
  1978. X            }
  1979. X--- 1302,1315 ----
  1980. X          else {
  1981. X              victual.fullwarn = TRUE;
  1982. X              if (victual.canchoke) {
  1983. X+ #ifdef MACOS
  1984. X+             if(!flags.silent) SysBeep(20);
  1985. X+             if(UseMacAlertText(128, "Stop eating ?") == 1)
  1986. X+ #else
  1987. X              pline("Stop eating? ");
  1988. X!             if(yn() == 'y')
  1989. X! #endif
  1990. X!                 reset_eat();
  1991. X              }
  1992. X          }
  1993. X            }
  1994. X***************
  1995. X*** 1281,1289 ****
  1996. X      newuhs(FALSE);
  1997. X  }
  1998. X  
  1999. X! #ifndef OVERLAY
  2000. X! static 
  2001. X! #endif
  2002. X  int
  2003. X  unfaint() {
  2004. X      (void) Hear_again();
  2005. X--- 1318,1324 ----
  2006. X      newuhs(FALSE);
  2007. X  }
  2008. X  
  2009. X! STATIC_PTR
  2010. X  int
  2011. X  unfaint() {
  2012. X      (void) Hear_again();
  2013. X***************
  2014. X*** 1407,1417 ****
  2015. X--- 1442,1461 ----
  2016. X  #endif
  2017. X  #ifdef POLYSELF
  2018. X      if (feeding && gold && metallivorous(uasmon)) {
  2019. X+ #ifdef MACOS
  2020. X+         char tmp[128];
  2021. X          if (gold->amount == 1)
  2022. X+         Sprintf(tmp, "There is 1 gold piece here. Eat it ?");
  2023. X+         else Sprintf(tmp, "There are %ld gold pieces here. Eat them ?",
  2024. X+                                 gold->amount);
  2025. X+         if(UseMacAlertText(128, tmp) == 1) {
  2026. X+ #else
  2027. X+         if (gold->amount == 1)
  2028. X          pline("There is 1 gold piece here; eat it? ");
  2029. X          else pline("There are %ld gold pieces here; eat them? ",
  2030. X                                  gold->amount);
  2031. X          if (yn() == 'y') {
  2032. X+ #endif
  2033. X          otmp = newobj(0);
  2034. X          otmp->olet = GOLD_SYM;
  2035. X          otmp->ox = u.ux;
  2036. X***************
  2037. X*** 1430,1441 ****
  2038. X--- 1474,1499 ----
  2039. X              feeding ? is_edible(otmp) :
  2040. X  #endif
  2041. X                          otmp->olet==FOOD_SYM) {
  2042. X+ #ifdef MACOS
  2043. X+             if(!flags.silent) SysBeep(20);
  2044. X+         {
  2045. X+             char tmp[128];
  2046. X+             Sprintf(tmp, "There %s %s here. %s %s ?",
  2047. X+                 (otmp->quan == 1) ? "is" : "are",
  2048. X+                 doname(otmp), verb,
  2049. X+                 (otmp->quan == 1) ? "it" : "one");
  2050. X+             if(UseMacAlertText(128, tmp) == 1)
  2051. X+ #else
  2052. X              pline("There %s %s here; %s %s? ",
  2053. X                  (otmp->quan == 1) ? "is" : "are",
  2054. X                  doname(otmp), verb,
  2055. X                  (otmp->quan == 1) ? "it" : "one");
  2056. X              if(yn() == 'y')
  2057. X+ #endif
  2058. X                  return(otmp);
  2059. X+ #ifdef MACOS
  2060. X+         }
  2061. X+ #endif
  2062. X          }
  2063. X          }
  2064. X      }
  2065. X
  2066. END_OF_FILE
  2067. if test 48763 -ne `wc -c <'patch8.02'`; then
  2068.     echo shar: \"'patch8.02'\" unpacked with wrong size!
  2069. fi
  2070. # end of 'patch8.02'
  2071. fi
  2072. echo shar: End of archive 13 \(of 24\).
  2073. cp /dev/null ark13isdone
  2074. MISSING=""
  2075. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ; do
  2076.     if test ! -f ark${I}isdone ; then
  2077.     MISSING="${MISSING} ${I}"
  2078.     fi
  2079. done
  2080. if test "${MISSING}" = "" ; then
  2081.     echo You have unpacked all 24 archives.
  2082.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2083. else
  2084.     echo You still need to unpack the following archives:
  2085.     echo "        " ${MISSING}
  2086. fi
  2087. ##  End of shell archive.
  2088. exit 0
  2089.